package org.itstack;


import org.itstack.model.Order;
import org.itstack.model.aggregates.TreeRich;
import org.itstack.model.vo.TreeNode;

public class OrderEngineHandle extends OrderEngineBase {
    
    @Override
    public OrderProcessResult process(Order order, TreeRich treeRich) {
        // 决策流程
        TreeNode treeNode = engineDecisionMaker(treeRich, order);
        
        // 决策结果
        return new OrderProcessResult(
            order.getId(), 
            treeNode.getRuleKey(), 
            treeNode.getNodeValue(), 
            treeNode.getRuleDesc()
        );
    }
}
